<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>MODULE_RS485 Module Introduction</title>
    <link href="/dc/css/bootstrap.min.css" rel="stylesheet">
    <link href="/dc/css/font/bootstrap-icons.min.css" rel="stylesheet">
    <link href="/dc/css/help-doc.css" rel="stylesheet">
</head>
<body>

<!-- Sidebar Navigation -->
<div class="sidebar">
    <h3>Table of Contents</h3>
    <ul>
        <li><a href="#description" class="active">Module Description</a></li>
        <li><a href="#periodupload">Automatic Data Reporting - Auto</a></li>
        <li><a href="#interruptupload">Data Reporting - Interrupt</a></li>
        <li><a href="#commandupload">Data Reporting - Command</a></li>
        <li><a href="#forward">Data Forwarding</a></li>
    </ul>
</div>

<!-- Main Content Area -->
<div class="main-content">
    <div class="text-center mb-4">
        <h1 class="display-4 font-weight-bold">MODULE_RS485 Module Introduction</h1>
    </div>
    <div class="help-item" id="process">
        <h6>Module Description</h6>
        <p>DC01's ESP chip has three UARTs, namely UART0, UART1, and UART2. UART0 is generally used for programming and logging, so here we talk about UART2 (UART1 is used for UART communication). Like most functional modules in ESP chips, the UART pins can be configured; they do not have to be fixed on those specific pins.
           For more details, please refer to.<a href="/dc/pub/doc?page=command_index&deviceType=dc01" target="_blank">Click</a>to view the RS485-related section.
           The principle of RS485 and UART is almost the same, just with different voltages, and the communication distance of RS485 is much farther. By default, it uses the same pin configuration, so if you want to enable both at the same time, you need to modify the configuration as they cannot use the same pin.
        </p>
    </div>
    <div class="help-item" id="periodupload">
        <h6>Data Reporting - Automatic</h6>
        <p>The automatically reported data is the status information of the RS485 operation. It mainly includes the number of times Tx and Rx occur, as well as the number of error occurrences. dataType type is PROPERTY, rxData is null.
            rxTimes: The total number of receptions after booting up, rxLength: The total length of received bytes, rxTimesFailed: The number of reception errors, rxUploadFailed: The number of upload errors, rxFifoOverTimes: The number of buffer overflow events in the hardware UART, such as receiving large amounts of data in a short period of time. rxBufFullTimes: The number of buffer full events in the hardware UART, rxBreakTimes: The number of interrupt events, rxParityErrTimes: The number of parity check errors during reception, rxFrameErrTimes: The number of frame errors during reception, txLength: The total length of sent bytes, txTimes: The total number of sending attempts, txTimesFailed: The total number of sending failures.
        </p>
        <code>
            {
                "key": "f402afaa0f9ceeeb230ce6291c95c306",
                "content": {
                    "id": "67b6a0aa87025163883ee5ab",
                    "deviceId": "67b460755a961507ca44bc0d",
                    "moduleTypeId": 19,
                    "request": null,
                    "requestTime": null,
                    "upload": {
                        "protocolType": "RS485",
                        "dataType": "PROPERTY",
                        "rxData": null,
                        "rxTimes": 10,
                        "rxLength": 59,
                        "rxTimesFailed": 0,
                        "rxUploadFailed": 0,
                        "rxFifoOverTimes": 0,
                        "rxBufFullTimes": 0,
                        "rxBreakTimes": 1,
                        "rxParityErrTimes": 0,
                        "rxFrameErrTimes": 0,
                        "txLength": 3,
                        "txTimes": 1,
                        "txTimesFailed": 0
                    },
                    "uploadTime": "2025-02-20T03:25:30.761688310Z",
                    "command": 6,
                    "operate": null,
                    "info": null,
                    "errorType": "OK",
                    "dataCommType": "PERIOD_UPLOAD",
                    "dataCommSource": "DEVICE_AUTO"
                }
            }
        </code>
    </div>
    <div class="help-item" id="interruptupload">
        <h6>Data Reporting - Interrupt</h6>
        <p>Interrupt reporting actually means that when the RS485 module is in listening mode, it automatically reports upon receiving information. Please see the RS485 chapter for details on how to receive data. Other fields are set to zero.
        </p>
    </div>
    <div class="help-item" id="commandupload">
        <h6>Data Reporting - Command</h6>
        <p>By sending commands to the device, you can trigger the RS485 module to send information. Please see the RS485 related chapter for details on which commands can be executed and the format of the reported data.
        </p>
    </div>
    <div class="help-item" id="forward">
        <h6>Data Forwarding</h6>
        <p>Please see<a href="/dc/pub/doc?page=dataflow&deviceType=dc01#cloudpush2client" target="_blank">Click</a>for how to configure the module's data forwarding.
            Please see<a href="/dc/pub/doc?page=dataflow&deviceType=dc01#datastructure" target="_blank">Click</a>for the format of forwarded data.
        </p>
    </div>
</div>
</body>
</html>